package com.quectel.core.module.grid.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author zhangheng
 * @email nolan.zhang@quectel.com
 * @date 2023/02/03 16:42
 */
@Data
@Schema
public class GridMemberWorkLogDto implements Serializable {

    /**
     *
     */
    @Schema(description = "")
    private Long id;

    /**
     * 租户id
     */
    @Schema(description = "租户id")
    private Long tenantId;

    /**
     * 小区id
     */
    @Schema(description = "小区id")
    private Long villageId;

    /**
     * 网格id
     */
    @Schema(description = "网格id")
    @NotNull
    private Long gridId;

    /**
     * 网格员id
     */
    @Schema(description = "网格员id")
    private Long gridMemberId;

    /**
     * 日志日期
     */
    @Schema(description = "日志日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date logDate;

    /**
     * 日志详情
     */
    @Schema(description = "日志详情")
    @NotEmpty
    private String detail;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Date createTime;


    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private Date updateTime;

    /************非数据库字段 start ************/


    /**
     * 网格员
     */
    @Schema(description = "网格员")
    private GridMemberDto gridMember;


    /**
     * 网格员
     */
    @Schema(description = "网格")
    private GridDto grid;


    /************非数据库字段 end **************/
}
